POV-Ray : Newsgroups : povray.programming : isosurf.cpp / inline & gcc : isosurf.cpp / inline & gcc Server Time
4 Oct 2024 17:10:52 EDT (-0400)
  isosurf.cpp / inline & gcc  
From: Mael
Date: 18 Mar 2003 16:21:39
Message: <3e778de3@news.povray.org>
A little remark after looking at the (nice) isosurface code :
Vector_IsoSurface_Function, Float_IsoSurface_Function, Evaluate_Function are
declared as inline functions but only defined at the end of isosurf.cpp. It
seems gcc(g++) will not inline the function if the call is before the
definition. If you want gcc to actually inline those functions they should
be moved at the top of the file (with Evaluate_Function first)
A quick test with scene isosurfaces.pov on a x86 linux (and gcc3.2) gives
114s vs 116s only by moving the functions

(another small thing : the parameter 'in_shadow_test' is not used in
recursive function IsoSurface_Function_Find_Root_R)

M


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.